package gui.util;

import java.io.File;

import javax.swing.BorderFactory;
import javax.swing.Icon;
import javax.swing.JLabel;
import javax.swing.filechooser.FileSystemView;

public class FileCheckBox extends ObserverThreestateCheckBox {
	
	private File file;
	
	public FileCheckBox(File file) {
		super();
		this.file = file;
		
		JLabel label = new JLabel(file.getName());
		Icon fileIcon = FileSystemView.getFileSystemView().getSystemIcon(file);
		label.setIcon(fileIcon);
		label.setBorder(BorderFactory.createEmptyBorder(0, 16, 0, 0));
		
		add(label);
	}
	
	public File getFile() {
		return this.file;
	}
		

}
